From: Carlos Garnacho Date: Thu, 30 Jun 2022 09:41:12 +0000 (+0200) Subject: keyboard: Shuffle text direction initialization X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c6c6eb5310dc191aabe9ad61d31c0b77b3702fbe;p=gnome-shell.git keyboard: Shuffle text direction initialization We do set the full OSK as LTR since keymaps are defined in that direction. Other actors inside the OSK might want differently so move this piece of setup to init(), so child actors can set their own without the OSK overwriting the value. Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index d63468768..25ffa67fd 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1285,7 +1285,15 @@ var Keyboard = GObject.registerClass({ }, }, class Keyboard extends St.BoxLayout { _init() { - super._init({ name: 'keyboard', reactive: true, vertical: true }); + super._init({ + name: 'keyboard', + reactive: true, + // Keyboard models are defined in LTR, we must override + // the locale setting in order to avoid flipping the + // keyboard on RTL locales. + text_direction: Clutter.TextDirection.LTR, + vertical: true, + }); this._focusInExtendedKeys = false; this._emojiActive = false; @@ -1410,11 +1418,6 @@ var Keyboard = GObject.registerClass({ this._ensureKeysForGroup(this._keyboardController.getCurrentGroup()); this._setActiveLayer(0); - // Keyboard models are defined in LTR, we must override - // the locale setting in order to avoid flipping the - // keyboard on RTL locales. - this.text_direction = Clutter.TextDirection.LTR; - Main.inputMethod.connect( 'terminal-mode-changed', this._onTerminalModeChanged.bind(this));